-LRB- CNN -RRB- -- McLaren 's Lewis Hamilton fought off fierce competition from Fernando Alonso and Mark Webber to secure his second Formula One victory of the season at the German Grand Prix .

The British driver stole the lead from Red Bull 's Webber off the grid , and though it changed hands several times during the race , his final pit stop was timed perfectly as he took the checkered flag 3.9 seconds ahead of Ferrari 's Alonso .

Webber was close behind in third and his teammate and championship leader Sebastian Vettel finished an error-laden afternoon in fourth place -- his worst finish of the season .

But his lead in the drivers ' championship is still 77 points over Webber , with Hamilton now third , 82 behind after his win at the Nurburgring .

Latest F1 standings after German Grand Prix

Hamilton , the 2008 world champion , told reporters at a press conference : `` That was one of the best races that I have ever done . We did n't expect to come here and be so fast and really I just could not be feeling any better .

`` It was just great and we have to keep pushing . These are the results that we can get - the car was really nice to drive . A fantastic job and fantastic win . ''

On a cool day in Germany , Hamilton started second on the grid but breezed past Webber to lead into the first corner and though the Australian passed him a few laps later the Briton regained the lead immediately .

Vettel toiled on the damp track , spinning out of control as his prospects of joining the leading pack receded , while Webber again edged in front after his first pit stop saw his speed pick up .

The second round of stops saw Webber push to the front again , before Alonso rounded him , only for the Spaniard to see Hamilton overtake on the outside to regain first place .

Hamilton was the first into the pit lane to make the required switch onto hard tires late in the race , Alonso leading for two laps before deciding to come in .

Webber led briefly , but was losing pace on his soft tires , and was forced to stop leaving Hamilton clear to take the flag and record the 16th grand prix victory of his career .

Vettel struggled with his brakes for most of the race -- his home grand prix -- but was able to salvage fourth place by passing Ferrari 's Felipe Massa on the penultimate lap .

After the race he told reporters : `` I think fourth was probably our maximum today , which is not satisfying . We need to work harder on our car to get back on to the podium , and maybe on to the top step again . ''

Hamilton 's teammate Jenson Button , the 2009 world champion , was forced to retire for the second race in a row after his car suffered hydraulic difficulties .

The next race in the Formula One calendar is the Hungarian Grand Prix next Sunday .

Meanwhile in MotoGP , Casey Stoner won the U.S. Grand Prix at Laguna Seca Raceway to consolidate his lead in motorcycling 's world championship standings .

The Australian , riding for Repsol Honda , finished more than five seconds ahead of Jorge Lorenzo of Spain , while Dani Pedrosa was third .

Stoner now has 193 championship points , 20 ahead of Lorenzo , with eight races remaining .

@highlight

Lewis Hamilton wins the German Grand Prix for McLaren

@highlight

British driver holds off fierce competition from Fernando Alonso and Mark Webber

@highlight

Championship leader Sebastian Vettel finishes fourth with Felipe Massa fifth

@highlight

Red Bull 's Vettel leads the drivers ' championship by 77 points from Webber